package com.etoak.api;

import com.etoak.common.core.enums.ResultEnum;
import com.etoak.common.core.vo.ResultVO;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@FeignClient("upload-service")
public interface UploadService {
    // 声明远程接口(若是Post接口,必须提供consumes属性，参数前加注解RequestPart)
    @PostMapping(value = "/upload/image",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    ResultVO<String> upload(@RequestPart MultipartFile image) throws IOException ;

}
